package com.lukk.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.lukk.pojo.Worker;
import com.lukk.pojo.WorkerSpace;

/**
 * 
 * WorkerDAO 上午10:22:54
 * 
 * Copyright zhaocj Inc. All rights reserved.
 * Love ME Like Justin Bieber.
 */
@Repository
public interface WorkerDAO {
	public List<Worker> selectByPage();

	public List<Worker> selectByMap(Object queryMap);

	public void modifyByPrimaryKey(Worker worker);
	public List<Worker> selectAllProvinceWorkersForInternalWorker(Map<String, Object> queryMap);

	public Worker selectByPrimaryKey(Integer workerId);

	public List<Worker> selectByProvinceAndStatus(Map<String, Object> queryMap);

	// 查询满足条件的数量
	public Integer selecCountByProvinceAndStatus(Map<String, Object> queryMap);

	// 根据省市区查询到注册的人数 queryType 0为省份 1为城市 2 为区域 queryCode chinaAreaTwo表的code
	public Integer selectWorkerCountByArea(Map<String, Object> queryMap);

	// 根据省份信息分页查询
	public List<Worker> selectWorkersByProvinceCode(Map<String, Object> queryMap);

	// 根据省份信息查询总数
	public Integer selectWorkersCountByProvinceCode(Map<String, Object> queryMap);

	public List<WorkerSpace> selectWorkerSpacesByWorkerID(Integer workerId);

	public List<Integer> selectWorkerIDSByCountryCode(String countryCode);

	public List<Worker> selectWorkersByCountryCode(@Param("workerIDS") List<Integer> workerIDS,
			@Param("offset") Integer offset, @Param("limit") Integer limit);

	public List<Worker> selectWorkerWithDrawalInfo(Map<String, Object> queryMap);

	public Integer selectWorkerCountWithDrawalInfo(Map<String, Object> queryMap);

	public Integer modifyWorkerWalletByWorkerID(@Param("workerID") Integer workerID, @Param("workerWallet") Double workerWallet);

	// 根据workerID查询出来工人的值
	public Double selectWalletByWorkerID(Integer workerID);

	public Map<String, Integer> selectAllocatedReduce(String workerID);

}
